var path = require("path");
var log4js = require('log4js');
log4js.loadAppender('file');

exports.getLog = function(root,type){
	log4js.addAppender(log4js.appenders.file(path.join(root,'logs',type+'.log')), type);
	return log4js.getLogger(type);
}